import { createDialog } from './common/dialog/DialogUtil';
import Router from './routes/Router';
import { RouteNames } from './routes/Routes';
const {ccclass, property} = cc._decorator;

@ccclass
export default class Helloworld extends cc.Component {


    start () {
        // init logic
        
    }

    onClick(e,type) {
        switch(+type) {
            case 1: {
                Router.toWithArgs(RouteNames.PAGE_ONE,{args:111})
                break
            }
            case 2: {
                Router.toWithArgs(RouteNames.PAGE_TWO,{args:111})
                break
            }
            case 3: {
                createDialog({
                    title: "测试",
                    rejectCall:()=> {
                        cc.log("点了否")
                    },
                    okCall: ()=> {
                        cc.log("点了是")
                    }
                })
            }
        }
    }
}
